home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
BAST003.422
< prev
next >
Wrap
Text File
|
1993-02-18
|
11KB
|
304 lines
BAST003.MOD -- New Piping System
Bast #224 @17303
Sat Feb 13 14:00:13 1993
/**
┌────────────────────────────────────────────────────────────────────────────┐
│ Mod Name: Revolutionary Pipe System Mod Author: Bast │
│ Difficulty: ▒▒▒░░░░░░░ Date: 02/07/93 │
│ WWIV Version: 4.22 and above │
│ Files Affected: BBSUTL.C, COM.C, MSGBASE.C, FCNS.H, VARS.H (argh!) │
│ Description: This piping system compensates for sysops with extended colors│
│ in, and doesn't use Ctrl-P. I've discovered that it is a pain │
│ not having a piping system that is compatible with extended │
│ colors, so I wrote this up. What it does is simple: it uses │
│ another Ctrl key, Ctrl-L to be specific, rather that Ctrl-P. │
│ All the pipe commands are in an ANSi I designed, and that is │
│ UUEncoded at the bottom of this mod. │
└────────────────────────────────────────────────────────────────────────────┘
**/
/** STEP 1: Backup Your Source!!!!!
I CANNOT and WILL NOT be responsible for any damage
done to your source code by this mod.
**/
/** STEP 2: Open BBSUTL.C **/
/** In void inli(...) Add The Following Above case 16: **/
case 12: /* Ctrl-L */
if (cp<maxlen-1) {
ch=getkey();
ch=upcase(ch);
if (pipe(ch)) {
s[cp++]=5;
s[cp++]=ch;
}
}
break;
/** Add The Following Function At The Bottom Of The File **/
int pipe(char ch)
{
char s[81];
strcpy(s,"");
switch (ch) {
case 'A': /* Laston */
sprintf(s,"%s",thisuser.laston);
break;
case 'B': /* LastRate */
sprintf(s,"%d",thisuser.lastrate);
break;
case 'C': /* City */
sprintf(s,"%s",thisuser.city);
break;
case 'D': /* DataPhone */
sprintf(s,"%s",thisuser.dataphone);
break;
case 'E': /* Exempt */
sprintf(s,"%d",thisuser.exempt);
break;
case 'F': /* First On */
sprintf(s,"%s",thisuser.firston);
break;
case 'G': /* User's Age */
itoa(thisuser.age,s,10);
break;
case 'H': /* User's SL */
itoa(thisuser.sl,s,10);
break;
case 'I': /* User's DSL */
itoa(thisuser.dsl,s,10);
break;
case 'J': /* Ontoday */
sprintf(s,"%d",thisuser.ontoday);
break;
case 'K': /* Birthdate: Month/Day/Year */
sprintf(s,"%d/%d/%d",thisuser.month,thisuser.day,thisuser.year);
break;
case 'L': /* User's Real Name */
sprintf(s,"%s",thisuser.realname);
break;
case 'M': /* Computer Type */
sprintf(s,"%s",ctypes[thisuser.comp_type]);
break;
case 'N': /* User's Name */
sprintf(s,"%s",thisuser.name);
break;
case 'O': /* Note */
sprintf(s,"%s",thisuser.note);
break;
case 'P': /* User's phone number */
sprintf(s,"%s",thisuser.phone);
break;
case 'Q': /* CallSign */
sprintf(s,"%s",thisuser.callsign);
break;
case 'R': /* Msgs read */
sprintf(s,"%d",thisuser.msgread);
break;
case 'S': /* Street */
sprintf(s,"%s",thisuser.street);
break;
case 'T': /* State */
sprintf(s,"%s",thisuser.state);
break;
case 'U': /* Country */
sprintf(s,"%s",thisuser.country);
break;
case 'V': /* Mail Waiting */
sprintf(s,"%d",thisuser.waiting);
break;
case 'W': /* Password */
sprintf(s,"%s",thisuser.pw);
break;
case 'X': /* Sex */
sprintf(s,"%c",thisuser.sex);
break;
case 'Y': /* BBS System Name */
sprintf(s,"%s",syscfg.systemname);
break;
case 'Z': /* Zip */
sprintf(s,"%s",thisuser.zipcode);
break;
case '1': /* CTRL-D */
sprintf(s,"%s",thisuser.macros[0]);
break;
case '2': /* CTRL-F */
sprintf(s,"%s",thisuser.macros[1]);
break;
case '3': /* CTRL-A */
sprintf(s,"%s",thisuser.macros[2]);
break;
case '4': /* Current Time */
strcpy(s,times());
break;
case '~': /* Ass Points */
sprintf(s,"%d",thisuser.ass_pts);
break;
case '!': /* # of illegal logons */
sprintf(s,"%d",thisuser.illegal);
break;
case '@': /* File Points */
sprintf(s,"%d",thisuser.filepoints);
break;
case '#': /* User's Number */
sprintf(s,"%d",usernum);
break;
case '$': /* Bank Time */
sprintf(s,"%d",thisuser.banktime);
break;
case '%': /* User's GOLD */
sprintf(s,"%.0f",thisuser.gold);
break;
case '^': /* WWiV Reg Num */
sprintf(s,"%d",thisuser.wwiv_regnum);
break;
case '&': /* Pause */
pausescr();
break;
case '*': /* Date */
strcpy(s,date());
break;
case ')': /* # of files uploaded */
sprintf(s,"%d",thisuser.uploaded);
break;
case '>': /* K uploaded */
sprintf(s,"%d",thisuser.uk);
break;
case '(': /* # of files downloaded */
sprintf(s,"%d",thisuser.downloaded);
break;
case '<': /* K downloaded */
sprintf(s,"%d",thisuser.dk);
break;
default:
return(0);
}
outstr(s);
return(1);
}
/** STEP 3: Save And Close BBSUTL.C And Open COM.C **/
/** In Function outchr(char c) Search For The Following **/
if (change_color) {
change_color = 0;
if ((c >= '0') && (c <= '7'))
ansic(c - '0');
return;
}
if (c == 3) {
change_color = 1;
return;
}
/** Below That, Add The Following **/
if (pipes) {
pipes = 0;
pipe(c);
return;
}
if (c == 5) { /** If C = CLOVER, 5 Being The Ascii Value Of The Clover **/
pipes = 1;
return;
}
/** STEP 4: Save And Close COM.C And Open FCNS.H **/
/** Under The BBSUTL.C Prototype Block, Add The Following **/
int pipe(char ch);
/** Save And Close FCNS.H And Open VARS.H
At the bottom of the __EXTRN__ int block, add the variable "pipes"
It should look something like below
**/
sysop_alert, tempio, topdata, topline, two_color,
userfile, usernum, useron, use_workspace, using_modem,
wfc, x_only, pipes; /** Added "pipes" **/
/** Step 5: Save And Close VARS.H And Open MSGBASE.C **/
/** In void inmsg(...) Do Following **/
/* Search For This, And Add Specified Code */
if (s[0]=='/') { /* Existing Code */
if (stricmp(s,"/HELP")==0) { /* Existing Code */
savel=0; /* Existing Code */
printmenu(2); /* Existing code */
} /* Existing Code */
if(stricmp(s,"/PIPES")==0) { /* Add Me */
savel=0; /* Add Me */
printfile("PIPES.ANS"); /* Add Me */
} /* Add Me */
/** STEP 6: Save And Close MSGBASE.C And Re-Compile Your Whole Board **/
/** STEP 7: UU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S,PY
M;4L@(!M;,S%M36]N=&@;6S,W;2\;6S,Q;41A>1M;,S=M+QM;,S%M665A<B`@;
M(!M;,S!M5B`@&ULS,6U-86EL(%=A:71I;F<@("`;6S,P;24@(!M;,S%M1V]L"
M9!M;,31#&ULS-&VS&ULS,&W;&ULQ-3LQ2!M;,#LS-FVS(!M;,3LS,&U>("`;\
M6W,-"AM;=1M;,S%M5U=I5B!296<@3G5M&ULU0QM;,S!M*2`@&ULS,6U5<&QO/
M861E9!M;-T,;6S,P;3X@(!M;,S%M57!L;V%D($L;6S$P0QM;,S1MLQM;,S!MV
MVQM;,38[,4@;6S`[,S9MLR`;6S$[,S!M*"`@&ULS,6U$;W=N;&]A9&5D&ULWF
M0QM;,S!M/"`@&ULS,6U$;W=N;&]A9"!+&ULR-D,;6S,T;;,;6S,P;=L;6S$W^
M.S%(&ULP;;,;6S8P0QM;,3LS-&VS&ULS,&W;&ULQ.#LQ2!M;,&W`Q!M;,S9M]
MQ,3$Q!M;,6W$Q,3$&ULS-&W$Q,3$Q,3$Q,3$Q,3$Q!M;<PT*&UMUQ,3$Q,3$`
MQ,3$Q,3$Q,3$Q,3$Q,3$Q,3$Q,3$Q,3$Q,3$Q,3$Q-D;6S,P;=L;6S$Y.S%(=
M("#?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?W]_?H
?W]_?W]_?W]_?W]_?W]_?W]_?&ULR,#LQ2!M;,&T-"FT-(
``
end
sum -r/size 49662/2720 section (from "begin" to "end")
sum -r/size 9084/1921 entire input file
There you go. Now, if you want to be mean, don't tell your users
you installed pipes and play around a little. It's great fun when
they don't know what's going on.. Heh. Any bugs you find with this
mod, please let me know ASAP so I can fix them. Thanx..
- Bast
2@7309 WWIVNet
2@17306 WWIVLink
<EOF>